Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## rdlc.rdl
Class Declaration_Named

    java.lang.Object
      rdlc.rdl.Declaration_Named

All Implemented Interfaces:
  Declaration, Expression

Direct Known Subclasses:
  ChannelModel_FIFOPipe, Declaration_Indirect, DynRoot_Standard, FileInclude, FileInclude, LibraryFile, LibraryFile, Message_Event, Message_Simple, Message_Struct, Message_Union

    public abstract class Declaration_Named

extends java.lang.Object
implements Declaration

Simple helper class which implements the basic functionality of a declaration. This keeps individual declarations classes from having to re-implement the same functionality. This reduces copy and pase bugs as well as making maintenance and documentation easier.

Version:
  $Revision: 1.18 $
Author:
  Greg Gibeling

Nested Class Summary

Nested classes/interfaces inherited from interface rdlc.rdl.Expression
`Expression.Phase`

Field Summary
`protected Identifier<Declaration>` | `iName` The resolved identifier name of this declaration.
`protected Namespace` | `namespace` The namespace in which this declaration was declared, not necessarily the one in which it will be bound.
`protected RawStaticIdentifier` | `rawStaticID` The static identifier specified in the source RDL for this declaration.

Constructor Summary
`protected` | `Declaration_Named()` Default constructor, does nothing.
`protected` | `Declaration_Named(Namespace _namespace)` Unnamed declaration constructor, records the given namespace.
`` | `Declaration_Named(java.lang.String _name, Namespace _namespace)` Creates this named declaration in the given namespace.

Method Summary
`Declaration` | `getBase()` Get the base declaration, ie one which is not indirect.
`Identifier<Declaration>` | `getIdentifier()` Simple accessor.
`Declaration` | `getNamedBase()` Get the named declaration closest to the base declaration.
`RawStaticIdentifier` | `getRawStaticID()` Simple accessor.
`void` | `getRequirements(CatalogSet<Identifier<Declaration>> requirements)` For basic declarations, the only requirements are the namespaces in which this declaration is bound.
`Declaration` | `getType()` Get the declaration which defines the type of this one.
`void` | `resolve(java.util.HashSet<Declaration> markSet, Log errorLog, Expression.Phase phase)` Resolve the qualified name of this declaration.
`void` | `setNamespace(Namespace _namespace)` Simple accessor.
`void` | `setRawStaticID(RawStaticIdentifier _rawStaticID)` Simple accessor.
`java.lang.String` | `toString()` Simple accessor.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface rdlc.rdl.Declaration
`getLambdaName`

Methods inherited from interface rdlc.rdl.Expression
`typeMatch`

Field Detail

### rawStaticID

    protected RawStaticIdentifier rawStaticID

  The static identifier specified in the source RDL for this declaration.

### namespace

    protected Namespace namespace

  The namespace in which this declaration was declared, not necessarily the one in which it will be bound.

### iName

    protected Identifier<Declaration> iName

  The resolved identifier name of this declaration.

Constructor Detail

### Declaration_Named

    protected Declaration_Named()

  Default constructor, does nothing.

### Declaration_Named

    protected Declaration_Named(Namespace _namespace)

  Unnamed declaration constructor, records the given namespace.

### Declaration_Named

    public Declaration_Named(java.lang.String _name,
                             Namespace _namespace)

  Creates this named declaration in the given namespace. If the namespace is not null, this declaration will be added to it. Either way this declaration will be fully resolved.

  Parameters:
    `_name` - The name to use for this declaration.
    `_namespace` - The namespace in which this declaration belongs.

Method Detail

### toString

    public java.lang.String toString()

  Simple accessor.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    A human readable representation of this object for debugging.

### getRawStaticID

    public RawStaticIdentifier getRawStaticID()

  Simple accessor. Used by namespaces during add().

  Returns:
    The raw static identifier with which this declaration was declared.
  See Also:
    `Namespace.add(Declaration_Named)`

### setRawStaticID

    public void setRawStaticID(RawStaticIdentifier _rawStaticID)

  Simple accessor. Used during normal parsing.

  Specified by:
    `setRawStaticID` in interface `Declaration`
  Parameters:
    `_rawStaticID` - Set the raw static identifier with which this declaration is declared.

### getIdentifier

    public Identifier<Declaration> getIdentifier()

  Simple accessor.

  Specified by:
    `getIdentifier` in interface `Declaration`
  Returns:
    The identifier which names this declaration.
  See Also:
    `Declaration.getIdentifier()`

### setNamespace

    public void setNamespace(Namespace _namespace)

  Simple accessor. Used during normal parsing.

  Specified by:
    `setNamespace` in interface `Expression`
  Parameters:
    `_namespace` - The namespace in which this declaration was declared. This may not be the same as the one in which it is eventually bound.

### resolve

    public void resolve(java.util.HashSet<Declaration> markSet,
                        Log errorLog,
                        Expression.Phase phase)

  Resolve the qualified name of this declaration.

  Specified by:
    `resolve` in interface `Expression`
  Parameters:
    `markSet` - Complete hash set of declarations on which the caller depends (including itself).
    `errorLog` - Log of errors to be reported to the user.
    `phase` - The phase of resolution to perform.
  See Also:
    `Expression.resolve(HashSet, Log, Phase)`

### getBase

    public Declaration getBase()

  Description copied from interface: `Declaration`
  Get the base declaration, ie one which is not indirect. This is useful for getting to the root of a list of indirect declarations to the one which actually specifies the properties of the given object.

  Specified by:
    `getBase` in interface `Declaration`
  Returns:
    Always returns this. Overridden in `Declaration_Indirect`.
  See Also:
    `Declaration.getBase()`, `Declaration_Indirect.getBase()`

### getNamedBase

    public Declaration getNamedBase()

  Description copied from interface: `Declaration`
  Get the named declaration closest to the base declaration. This is useful when generating named types for eg. software languages, where all of the datatypes need to be named.

  Specified by:
    `getNamedBase` in interface `Declaration`
  Returns:
    Despite being a named declaration, somes the name is null. In that case, this method returns `null`.
  See Also:
    `Declaration.getNamedBase()`

### getType

    public Declaration getType()

  Description copied from interface: `Declaration`
  Get the declaration which defines the type of this one. This will return the first named declaration under this one.

  Specified by:
    `getType` in interface `Declaration`
  Returns:
    If this declaration has a non-null name, then it will be returned. Otherwise returns null.
  See Also:
    `Declaration.getType()`

### getRequirements

    public void getRequirements(CatalogSet<Identifier<Declaration>> requirements)

  For basic declarations, the only requirements are the namespaces in which this declaration is bound. Classes that inherit from this one may add to the list.

  Specified by:
    `getRequirements` in interface `Expression`
  Parameters:
    `requirements` - A list to which this will add the declarations upon which this one relies.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD